package com.chen.controller;

import com.chen.service.ExamHistoryService;
import com.chen.vo.ExamHistoryVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

/**
 * 考试纪律
 */
@Controller
@RequestMapping("/examHistory")
public class ExamHistoryController {

    @Autowired
    private ExamHistoryService examHistoryService;


    /**
     * 考试记录列表
     * @return
     */
    @RequestMapping("/historys")
    public ModelAndView examHistorys() {
        List<ExamHistoryVO> historys = examHistoryService.findExamHistoryList();
        ModelAndView model = new ModelAndView("/admin/examHistorys");
        model.addObject("historys", historys);
        return model;
    }

}
